//
//  RuleViewController.m
//  penzer
//
//  Created by caiyc on 2018/10/11.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "RuleViewController.h"

@interface RuleViewController ()
@property (weak, nonatomic) IBOutlet UIWebView *webView;

@end

@implementation RuleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNavigation:1 andTitle:@"选择标签" andNaviColor:[UIColor whiteColor] andTitleColor:nil];
    [self loadData];
    // Do any additional setup after loading the view from its nib.
}
-(void)loadData{
    AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManager manager];
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html", nil];
NSString *url = [NSString stringWithFormat:@"%@?i=10&c=entry&ctrl=live&ac=member&op=member&m=bz_activities&token=d6c58d58c38f023f92327383594aa192&ta=xieyi",BASE_URL];
    [manager POST:url parameters:nil success:^(AFHTTPRequestOperation * _Nonnull operation, id  _Nonnull responseObject) {
        if(responseObject){
             [ self.webView loadHTMLString:responseObject[@"message"][@"data"][@"xieyi"] baseURL:nil];
        }
    } failure:^(AFHTTPRequestOperation * _Nullable operation, NSError * _Nonnull error) {
        
    }];
//    NSDictionary *param = @{@"ac":@"member",
//                            @"op":@"member",
//                            @"ctrl":@"live_anchor",
//                            @"ta":@"xieyi"};
//    [self weqPostHandle:param success:^(id response) {
//        if(response){
//            [ self.webView loadHTMLString:response[@"data"][@"xieyi"] baseURL:nil];
//        }
//    } failure:^(NSError *error) {
//
//    }];
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
